package org.argus.management.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.argus.management.domain.Role;
import org.argus.management.system.model.RoleMenuBindReq;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_role(角色信息表)】的数据库操作Mapper
* @createDate 2024-04-25 19:32:32
* @Entity org.argus.management.domain.Role
*/
public interface RoleMapper extends BaseMapper<Role> {

    int checkNameCodeDuplicateCount(@Param("role") Role role);

    int getRoleUserCount(Long id);

    List<Long> roleMenuIds(Long id);

    void roleMenuBind(@Param("req") RoleMenuBindReq req);

    List<Role> getUserRoles(Long userId);
}